package com.rc.activity.dao;

import android.database.sqlite.SQLiteDatabase;

import java.util.Map;

import de.greenrobot.dao.AbstractDao;
import de.greenrobot.dao.AbstractDaoSession;
import de.greenrobot.dao.identityscope.IdentityScopeType;
import de.greenrobot.dao.internal.DaoConfig;

import com.rc.activity.dao.tbl_User;
import com.rc.activity.dao.tbl_Profile;
import com.rc.activity.dao.tbl_Settings;
import com.rc.activity.dao.tbl_Count;
import com.rc.activity.dao.tbl_Receipt;
import com.rc.activity.dao.tbl_Trip;
import com.rc.activity.dao.tbl_Item;
import com.rc.activity.dao.tbl_Category;
import com.rc.activity.dao.tbl_Report;
import com.rc.activity.dao.tbl_Merchant;
import com.rc.activity.dao.tbl_TripItems;

import com.rc.activity.dao.tbl_UserDao;
import com.rc.activity.dao.tbl_ProfileDao;
import com.rc.activity.dao.tbl_SettingsDao;
import com.rc.activity.dao.tbl_CountDao;
import com.rc.activity.dao.tbl_ReceiptDao;
import com.rc.activity.dao.tbl_TripDao;
import com.rc.activity.dao.tbl_ItemDao;
import com.rc.activity.dao.tbl_CategoryDao;
import com.rc.activity.dao.tbl_ReportDao;
import com.rc.activity.dao.tbl_MerchantDao;
import com.rc.activity.dao.tbl_TripItemsDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see de.greenrobot.dao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig tbl_UserDaoConfig;
    private final DaoConfig tbl_ProfileDaoConfig;
    private final DaoConfig tbl_SettingsDaoConfig;
    private final DaoConfig tbl_CountDaoConfig;
    private final DaoConfig tbl_ReceiptDaoConfig;
    private final DaoConfig tbl_TripDaoConfig;
    private final DaoConfig tbl_ItemDaoConfig;
    private final DaoConfig tbl_CategoryDaoConfig;
    private final DaoConfig tbl_ReportDaoConfig;
    private final DaoConfig tbl_MerchantDaoConfig;
    private final DaoConfig tbl_TripItemsDaoConfig;

    private final tbl_UserDao tbl_UserDao;
    private final tbl_ProfileDao tbl_ProfileDao;
    private final tbl_SettingsDao tbl_SettingsDao;
    private final tbl_CountDao tbl_CountDao;
    private final tbl_ReceiptDao tbl_ReceiptDao;
    private final tbl_TripDao tbl_TripDao;
    private final tbl_ItemDao tbl_ItemDao;
    private final tbl_CategoryDao tbl_CategoryDao;
    private final tbl_ReportDao tbl_ReportDao;
    private final tbl_MerchantDao tbl_MerchantDao;
    private final tbl_TripItemsDao tbl_TripItemsDao;

    public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        tbl_UserDaoConfig = daoConfigMap.get(tbl_UserDao.class).clone();
        tbl_UserDaoConfig.initIdentityScope(type);

        tbl_ProfileDaoConfig = daoConfigMap.get(tbl_ProfileDao.class).clone();
        tbl_ProfileDaoConfig.initIdentityScope(type);

        tbl_SettingsDaoConfig = daoConfigMap.get(tbl_SettingsDao.class).clone();
        tbl_SettingsDaoConfig.initIdentityScope(type);

        tbl_CountDaoConfig = daoConfigMap.get(tbl_CountDao.class).clone();
        tbl_CountDaoConfig.initIdentityScope(type);

        tbl_ReceiptDaoConfig = daoConfigMap.get(tbl_ReceiptDao.class).clone();
        tbl_ReceiptDaoConfig.initIdentityScope(type);

        tbl_TripDaoConfig = daoConfigMap.get(tbl_TripDao.class).clone();
        tbl_TripDaoConfig.initIdentityScope(type);

        tbl_ItemDaoConfig = daoConfigMap.get(tbl_ItemDao.class).clone();
        tbl_ItemDaoConfig.initIdentityScope(type);

        tbl_CategoryDaoConfig = daoConfigMap.get(tbl_CategoryDao.class).clone();
        tbl_CategoryDaoConfig.initIdentityScope(type);

        tbl_ReportDaoConfig = daoConfigMap.get(tbl_ReportDao.class).clone();
        tbl_ReportDaoConfig.initIdentityScope(type);

        tbl_MerchantDaoConfig = daoConfigMap.get(tbl_MerchantDao.class).clone();
        tbl_MerchantDaoConfig.initIdentityScope(type);

        tbl_TripItemsDaoConfig = daoConfigMap.get(tbl_TripItemsDao.class).clone();
        tbl_TripItemsDaoConfig.initIdentityScope(type);

        tbl_UserDao = new tbl_UserDao(tbl_UserDaoConfig, this);
        tbl_ProfileDao = new tbl_ProfileDao(tbl_ProfileDaoConfig, this);
        tbl_SettingsDao = new tbl_SettingsDao(tbl_SettingsDaoConfig, this);
        tbl_CountDao = new tbl_CountDao(tbl_CountDaoConfig, this);
        tbl_ReceiptDao = new tbl_ReceiptDao(tbl_ReceiptDaoConfig, this);
        tbl_TripDao = new tbl_TripDao(tbl_TripDaoConfig, this);
        tbl_ItemDao = new tbl_ItemDao(tbl_ItemDaoConfig, this);
        tbl_CategoryDao = new tbl_CategoryDao(tbl_CategoryDaoConfig, this);
        tbl_ReportDao = new tbl_ReportDao(tbl_ReportDaoConfig, this);
        tbl_MerchantDao = new tbl_MerchantDao(tbl_MerchantDaoConfig, this);
        tbl_TripItemsDao = new tbl_TripItemsDao(tbl_TripItemsDaoConfig, this);

        registerDao(tbl_User.class, tbl_UserDao);
        registerDao(tbl_Profile.class, tbl_ProfileDao);
        registerDao(tbl_Settings.class, tbl_SettingsDao);
        registerDao(tbl_Count.class, tbl_CountDao);
        registerDao(tbl_Receipt.class, tbl_ReceiptDao);
        registerDao(tbl_Trip.class, tbl_TripDao);
        registerDao(tbl_Item.class, tbl_ItemDao);
        registerDao(tbl_Category.class, tbl_CategoryDao);
        registerDao(tbl_Report.class, tbl_ReportDao);
        registerDao(tbl_Merchant.class, tbl_MerchantDao);
        registerDao(tbl_TripItems.class, tbl_TripItemsDao);
    }
    
    public void clear() {
        tbl_UserDaoConfig.getIdentityScope().clear();
        tbl_ProfileDaoConfig.getIdentityScope().clear();
        tbl_SettingsDaoConfig.getIdentityScope().clear();
        tbl_CountDaoConfig.getIdentityScope().clear();
        tbl_ReceiptDaoConfig.getIdentityScope().clear();
        tbl_TripDaoConfig.getIdentityScope().clear();
        tbl_ItemDaoConfig.getIdentityScope().clear();
        tbl_CategoryDaoConfig.getIdentityScope().clear();
        tbl_ReportDaoConfig.getIdentityScope().clear();
        tbl_MerchantDaoConfig.getIdentityScope().clear();
        tbl_TripItemsDaoConfig.getIdentityScope().clear();
    }

    public tbl_UserDao getTbl_UserDao() {
        return tbl_UserDao;
    }

    public tbl_ProfileDao getTbl_ProfileDao() {
        return tbl_ProfileDao;
    }

    public tbl_SettingsDao getTbl_SettingsDao() {
        return tbl_SettingsDao;
    }

    public tbl_CountDao getTbl_CountDao() {
        return tbl_CountDao;
    }

    public tbl_ReceiptDao getTbl_ReceiptDao() {
        return tbl_ReceiptDao;
    }

    public tbl_TripDao getTbl_TripDao() {
        return tbl_TripDao;
    }

    public tbl_ItemDao getTbl_ItemDao() {
        return tbl_ItemDao;
    }

    public tbl_CategoryDao getTbl_CategoryDao() {
        return tbl_CategoryDao;
    }

    public tbl_ReportDao getTbl_ReportDao() {
        return tbl_ReportDao;
    }

    public tbl_MerchantDao getTbl_MerchantDao() {
        return tbl_MerchantDao;
    }

    public tbl_TripItemsDao getTbl_TripItemsDao() {
        return tbl_TripItemsDao;
    }

}
